USE [OctoNetApps]
GO

/****** Object:  Table [classified].[ClassifiedResources]    Script Date: 05/25/2011 06:42:56 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [classified].[ClassifiedResources](
	[ResourceID] [bigint] NOT NULL,
	[MasterResourceID] [bigint] NULL,
	[DefaultLocation] [geography] NOT NULL,
	[AllowAnonymousAds] [bit] NOT NULL,
	[Comments] [tinyint] NOT NULL,
	[AllowRenewal] [bit] NOT NULL,
	[AutoExpireAnonymousDays] [smallint] NOT NULL,
	[AutoExpireNonAnonymousDays] [smallint] NOT NULL,
	[CategoryTreeVersion] [int] NOT NULL,
	[AdApprove] [bit] NOT NULL,
	[CurrencyID] [tinyint] NOT NULL,
	[AdminMail] [varchar](50) NULL,
 CONSTRAINT [PK_ClassifiedResources] PRIMARY KEY CLUSTERED 
(
	[ResourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [classified].[ClassifiedResources]  WITH CHECK ADD  CONSTRAINT [FK_ClassifiedResources_ClassifiedCurrency] FOREIGN KEY([CurrencyID])
REFERENCES [classified].[ClassifiedCurrency] ([CurrencyID])
GO

ALTER TABLE [classified].[ClassifiedResources] CHECK CONSTRAINT [FK_ClassifiedResources_ClassifiedCurrency]
GO

ALTER TABLE [classified].[ClassifiedResources] ADD  DEFAULT ((0)) FOR [CategoryTreeVersion]
GO


